package com.example.pei.papa.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;

import com.example.pei.papa.R;

/**
 * Created by Pei on 2017/11/23.
 */

public class savePhotoDialog extends Dialog implements View.OnClickListener {

    private Context context;
    private Button button_save;
    private PhotoSaveListener listener;

    public interface PhotoSaveListener {
        public void onClick(View view);
    }

    public savePhotoDialog(@NonNull Context context) {
        super(context);
        this.context=context;
    }
    public savePhotoDialog(Context context, int theme, PhotoSaveListener listener) {
        super(context, theme);
        this.context=context;
        this.listener=listener;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.save_photo_dialog);

        button_save=(Button)findViewById(R.id.btn_save);
        button_save.setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        listener.onClick(view);
    }
}
